import React from "react";

export default function () {
  const heroList = [
    { id: 1, heroName: "亚瑟", role: "战士" },
    { id: 2, heroName: "牛魔王", role: "战士" },
    { id: 3, heroName: "鲁班七号", role: "射手" },
  ];
  return (
    <ul>
      {heroList.map((hero) => {
        return (
          <li key={hero.id}>
            {hero.heroName} -- {hero.role}
          </li>
        );
      })}
    </ul>
  );
}
